#include "animal.h"

void Dogeat(void)
{

    printf("dog eat shift\n");
}


struct animal dog = {

    .name = "dog",
    .age  = 11,
    .eat  = Dogeat
};


struct animal * PutLink_dog(struct animal* head)
{
    struct animal * lost;
    lost = head;

    if(head == NULL)
    {
        head = &dog;
    }

    else
    {
        while(lost -> next != NULL)
        {
            lost = lost->next;
        }

        lost->next = &dog;
    }

    return head;
}
